from rest_framework.response import Response
from rest_framework.viewsets import ModelViewSet

from goods.models import SKUImage, SKU
from sadmin.serializersss.image_serializers import SKUImageSerializerz, SKUSimpleSerializers
from sadmin.utils import Mypage


class SKUImageViewSet(ModelViewSet):
    queryset = SKUImage.objects.all()
    serializer_class = SKUImageSerializerz
    pagination_class = Mypage
    def get_simple(self,request):
        queryset = SKU.objects.all()
        serializer_class = SKUSimpleSerializers(queryset,many=True)
        return Response(serializer_class.data)




# class SKUSimpleViewSet(ModelViewSet):
#     queryset = SKU
#     serializer_class =